import request from '@/utils/fetch.js'

const baseUrl = config.baseApiUrl;

export function getBookMarkType() {
    return request.get(`${baseUrl}/BookMark/GetBookMarkType`);
}

export function getBookMarkByType(type,name,pageSize,pageIndex) {
    
    return request.get(`${baseUrl}/BookMark/GetBookMarkByType`,{type:type,name:name},{pageSize:pageSize,pageIndex:pageIndex});
}

export function saveBookMarkType(bookmarkType) {
    debugger;
    return request.post(`${baseUrl}/BookMark/SaveBookMarkType`,{id:bookmarkType.id,name:bookmarkType.name});
}

export function deleteBookMarkType(id) {
    return request.get(`${baseUrl}/BookMark/DeleteBookMarkType`,{id:id});
}

export function saveBookMark(bookmark) {
    return request.post(`${baseUrl}/BookMark/SaveBookMark`,bookmark);
}


export function deleteBookMark(id) {
    return request.get(`${baseUrl}/BookMark/DeleteBookMark`,{id:id});
}


export function getBookMarkItem(id) {
    return request.get(`${baseUrl}/BookMark/GetBookMarkItem`,{id:id});
}

